草庐IT

Android Studio 找不到 JUnit 包

全部标签

c# - 在 'object' 上找不到 WPF/XAML 属性

我在一个新的WPF应用程序中使用BackgroundWorker,我需要在它在后台工作时报告进度/更新UI。我在WIndowsForms应用程序中已经这样做了很长时间。我刚刚为WPF重写了这一切,这让我有点头疼。它在运行时不断抛出以下错误:System.Windows.DataError:40:BindingExpressionpatherror:'Sender'propertynotfoundon'object'''Char'(HashCode=5046349)'.BindingExpression:Path=Sender;DataItem='Char'(HashCode=50463

c# - 在 NUnit 参数化测试中找不到合适的构造函数

查看下面的测试夹具:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingNUnit.Framework;//////TestsrelatingtoHarryPotter///[TestFixture("Dumbledore")]publicclassHarryPotterTests{publicstringName;publicHarryPotterTests(stringpersonName){Name=personName;}[Test]publicvoidTest()

c# - 找不到 Xamarin.Forms.Platform.Android.LabelRenderer(xamarin 表单)的构造函数

我的xamlonpcl项目中有一个图像列表当我在samsumggalaxys5设备上测试我的应用程序时我这样做:我进入列表的页面,然后我按下操作栏上的后退按钮......我做了很多次......然后,它发生了:System.NotSupportedException:UnabletoactivateinstanceoftypeXamarin.Forms.Platform.Android.Platform+DefaultRendererfromnativehandle0x20e0001d(key_handle0x42433c30).或Unabletoactivateinstanceoft

c# - 为什么 FindSystemTimeZoneById 找不到 GetSystemTimeZones 返回的某些时区?

我遇到了一个似乎无法解决的奇怪问题。当我在我的Win7x64机器上调用TimeZoneInfo.GetSystemTimeZones时,我得到了101个结果。当我对其中的每一个调用TimeZoneInfo.FindSystemTimeZoneById并传递TimeZoneInfo对象的StandardName属性时,其中3个抛出TimeZoneNotFoundException。这是一个示例:vartzs=TimeZoneInfo.GetSystemTimeZones();foreach(vartimeZoneInfointzs.OrderBy(t=>t.BaseUtcOffset))

c# - 在类库中找不到 ConfigurationManager

所以,我有一个类库,我知道它会被网站使用,我需要访问配置设置。我添加了对System.Configuration的引用,但在类库中找不到ConfigurationManager。有几件事,其中一件是当我添加对System.Configuration的引用时,它显示为带有小写字母“c”的“System.configuration”,我认为这很奇怪。另一件事,当我访问System.Configuration时,最接近ConfigurationManager的是“ConfigurationSettings”。我在允许我使用ConfigurationManager和此类库的Web应用程序中查看

c# - ASP.NET Core Entity Framework Core 找不到 IndexAttribute

在执行“dotnetrun”后,我在我的Mac上的IDE和控制台窗口中收到来自VisualStudioCode的以下信息:Thetypeornamespacename'IndexAttribute'couldnotbefound我有一个名为Story的类,我想使用它通过CodeFirst生成数据库。此类有一个标有KeyAttribute的主键和标有MaxLengthAttribute的Author字符串,因此它们都有效(使用System.ComponentModel.DataAnnotations)。另外两个字段DateTimeDate和boolIsPublished应用了IndexA

c# - Visual Studio 2012 - 在 .NET 4.5 框架中找不到 System.Transactions 程序集

我试图在C#VisualStudio2012项目中添加对System.Transactions的引用,但System.Transactions在框架程序集中不可用,您可以在下面的屏幕截图中看到:有谁知道为什么System.Transactions对我不可用?我怎样才能让它重新出现?编辑:修复了屏幕截图,谢谢Marc! 最佳答案 为此发布了一个MicrosoftConnect条目,其中有一条评论建议您可以浏览它。给出的路径是:C:\ProgramFiles(x86)\ReferenceAssemblies\Microsoft\Fram

c# - 找不到 Microsoft.AspNetCore.Antiforgery

我正在将asp.netcore2.0网站部署到IIS10。我已确保我的应用在program.settings文件中使用正确的ISS配置。publicclassProgram{publicstaticvoidMain(string[]args){BuildWebHost(args).Run();}publicstaticIWebHostBuildWebHost(string[]args)=>WebHost.CreateDefaultBuilder(args).UseKestrel().UseContentRoot(Directory.GetCurrentDirectory()).UseI

c# - .mdf"failed with the operating system error 2(系统找不到指定的文件。)

protectedvoidregister_Click(objectsender,EventArgse){AddUser(userName.Text,password.Text,confirm.Text);}voidAddUser(stringname,stringpass,stringconfirm){Useru=newUser(name,pass,confirm);if(u.Valid){using(vardb=newSiteContext()){db.User.Add(u);db.SaveChanges();}}}}publicclassUser{publicintUserId{

c# - 在可移植项目中找不到“GalaSoft”MvvmLight

我克隆了一个解决方案,它包含多个基于GalaSoftMvvmLight库的项目,还有两个可移植项目。我已经安装了所有必需的nuget包和引用,但我无法构建这些可移植项目,并且需要先构建这些可移植项目,因为所有其他项目都引用它。我在使用GalaSoft的每个文件中都遇到了这个(如下)错误。它是一个可移植类库项目。Error64Thetypeornamespacename'GalaSoft'couldnotbefound(areyoumissingausingdirectiveoranassemblyreference我在这个项目中引用了这个(下面)PortableMvvmLight库\M